<?php

class Application_Form_Element_TblcompanyNomSelect extends Zend_Form_Element_Select {
    public function init() {
        $oCompanyTb = new Application_Model_TblcompanyMapper();
        $this->addMultiOption(0, 'Please select...');
        $this->setLabel("Nom de la company");
        $entries = $oCompanyTb->fetchAll();
        
        //Zend_Debug::dump($entries, $label=null, $echo=true);

        foreach ($entries as $oCompany) {
            $this->addMultiOption($oCompany->getNom(), $oCompany->getSiret() . " " . $oCompany->getNom());
        }
    }
}